﻿#ifndef NSSHARE_SYS_WINSOCK_H_
#define NSSHARE_SYS_WINSOCK_H_

#include "../base/base_object.h"

namespace nsshare
{
namespace sys
{

class IOPortal;

//前摄器
class Proactor
    :public base::BaseObject
{
public:
    Proactor();
    ~Proactor();	
    bool init();
    void fini();

    //等待一个异步结果
    void Run(int ms);

    //关联到前摄器
    bool Associate(IOPortal & portal);

private:
#if defined NSSHARE_WINDOWS
    HANDLE comp_port_;
#endif
};
}
}

#endif